import {
	request
} from "@/serve/serve.js"
// import {
// 	requests
// } from "@/serve/serve.js"
// export async function post(urlr, data) {
// 	try {
// 		const url = urlr;
// 		const method = "post";
// 		let token = uni.getStorageSync("token");
// 		const data = data || {};
// 		console.log("nihao", response)
// 		const response = await request(url, method, data, token);
// 		console.log("nihao", response)
// 		return response;
// 	} catch (err) {
// 		uni.$u.toast(err)
// 	}
// }
// export async function postss(urlr, data) {
// 	try {
// 		const url = urlr;
// 		const method = "post";
// 		let token = uni.getStorageSync("lifeData").vuex_token;
// 		const response = await requests(url, method, data, token);
// 		return response
// 	} catch (err) {
// 		uni.$u.toast(err)
// 	}
// }
export async function post(urlr, data) {
	try {
		const url = urlr;
		const method = "post";
		let token = uni.getStorageSync("lifeData").vuex_token;
		const response = await request(url, method, data, token);
		return response
	} catch (err) {
		uni.$u.toast(err)
	}
}
export async function get(urlr, data) {
	try {
		const url = urlr;
		const method = "get";
		let token = uni.getStorageSync("lifeData").vuex_token;
		const response = await request(url, method, data, token);
		return response
	} catch (err) {
		uni.$u.toast(err)
	}
}
// export async function postCommon(urlr, data) {
// 	try {
// 		const url = urlr;
// 		const method = "post";
// 		let token = uni.getStorageSync("App-Token");
// 		const response = await request(url, method, data, token);
// 		return response
// 	} catch (err) {
// 		uni.$u.toast(err)
// 	}
// }